#if 0
#include <buola/gui.h>

#include <buola/gui/cicon.h>

#include <buola/widgets/ctheme.h>
#include <buola/widgets/cdialoglayoutmanager.h>
#include <buola/widgets/ctabbox.h>
#include <buola/widgets/ipropertypage.h>
#include <buola/widgets/cbutton.h>
#include <buola/widgets/cpropertydialog.h>

#define GROUP_LOWER     1
#define GROUP_BUTTONS   2
#define GROUP_UPPER     3

namespace buola { namespace gui {

void CPropertyDialog::OnCreate()
{
    Resize(CSize_d(450,600));

    SetTitle(WI18N("Property dialog"));

    mTabBox=new CTabBox;
    mTabBox->Create(this);

    mOKButton=new CButton;
    mOKButton->ePressed.Connect(&CPropertyDialog::OnOK,this);
    mOKButton->Create(this);
    mOKButton->SetCaption(WI18N("OK"));

    mCancelButton=new CButton;
    mCancelButton->ePressed.Connect(&CPropertyDialog::OnCancel,this);
    mCancelButton->Create(this);
    mCancelButton->SetCaption(WI18N("Cancel"));

    mApplyButton=new CButton;
    mApplyButton->ePressed.Connect(&CPropertyDialog::OnApply,this);
    mApplyButton->Create(this);
    mApplyButton->SetCaption(WI18N("Apply"));

//General layout
    CDialogLayoutManager *lLayout=CDialogLayoutManager::Get(this);

    lLayout->AddHalf(GROUP_LOWER,WLAY_BOTTOM-60,WLAY_B);
    lLayout->AddHalf(GROUP_UPPER,WLAY_BOTTOM-60,WLAY_T);
    lLayout->AddGroup(GROUP_BUTTONS,WLAY_RIGHT-270,20,WLAY_RIGHT-20,
                      WLAY_BOTTOM-20,std::wstring(),WLAY_DEFAULT,GROUP_LOWER);

    lLayout->At(mTabBox,10,10,WLAY_RIGHT-10,WLAY_BOTTOM-10,GROUP_UPPER);
    lLayout->ArrayGroup(WLAY_HORIZ,20,GROUP_BUTTONS,3,
                                mOKButton,mCancelButton,mApplyButton);

    mTabBox->Show();
    mOKButton->Show();
    mCancelButton->Show();
    mApplyButton->Show();

    get_default_theme()->SetBackground(this);
}

void CPropertyDialog::AddPage(IPropertyPage *pPage)
{
    mTabBox->AddItem(pPage->GetPageName(),pPage->GetPageIcon(),
                pPage->GetPageWindow());
}

void CPropertyDialog::OnOK()
{
    for(int i=0;i<mPages.size();i++)
    {
        mPages[i]->OnPageOK();
    }

    mResult=DIALOG_OK;

    Destroy();
}

void CPropertyDialog::OnCancel()
{
    for(int i=0;i<mPages.size();i++)
    {
        mPages[i]->OnPageCancel();
    }

    mResult=DIALOG_CANCEL;

    Destroy();
}

void CPropertyDialog::OnApply()
{
    for(int i=0;i<mPages.size();i++)
    {
        mPages[i]->OnPageApply();
    }
}


/*namespace gui*/ } /*namespace buola*/ }
#endif